{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "from datetime import datetime, date\n",
    "from perspective import PerspectiveWidget"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "# schema\n",
    "df = pd.DataFrame([\n",
    "    {\n",
    "       'int': 1,\n",
    "       'float': 1.5,\n",
    "       'string': '20150505',\n",
    "       'date': date.today(),\n",
    "       'datetime': datetime.now(),\n",
    "       'object': datetime.now(),\n",
    "    },\n",
    "    {\n",
    "       'int': 1,\n",
    "       'float': 1.5,\n",
    "       'string': '20150506',\n",
    "       'date': None,\n",
    "       'datetime': None,\n",
    "       'object': None,\n",
    "    },\n",
    "])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>date</th>\n",
       "      <th>datetime</th>\n",
       "      <th>float</th>\n",
       "      <th>int</th>\n",
       "      <th>object</th>\n",
       "      <th>string</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2019-02-16</td>\n",
       "      <td>2019-02-16 10:38:53.679914</td>\n",
       "      <td>1.5</td>\n",
       "      <td>1</td>\n",
       "      <td>&lt;class 'datetime.datetime'&gt;</td>\n",
       "      <td>20150505</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>None</td>\n",
       "      <td>NaT</td>\n",
       "      <td>1.5</td>\n",
       "      <td>1</td>\n",
       "      <td>None</td>\n",
       "      <td>20150506</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         date                   datetime  float  int  \\\n",
       "0  2019-02-16 2019-02-16 10:38:53.679914    1.5    1   \n",
       "1        None                        NaT    1.5    1   \n",
       "\n",
       "                        object    string  \n",
       "0  <class 'datetime.datetime'>  20150505  \n",
       "1                         None  20150506  "
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "psp = PerspectiveWidget(df)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
